/*
 *  particle.h
 *  EPPI-0.0
 *
 *  Created by Juan Carlos Garcia Orden on 15/11/07.
 *
 */
 
#ifndef _particle_h_
#define _particle_h_

#include <iostream>
#include <fstream>
#include "component.h"

using namespace std;

class Particle : public Component
{
private:
	double mass;
	double partial_qddotOld;
/*	Data members from the base class Component
	int dim;
	int numDofs;
	vector<string> pointNames;
	map<string,Point*,less<string> > mPoints;
	vector<int> localGlob;
	double time;
	string matName;
	vector<double> q;
	vector<double> dq;
	vector<double> qC;
	vector<double> dqC;
	vector<double> Fi;
	vector<double> Fq;
	vector<double> Ft;
	vector< vector<double> > Ki;
	vector< vector<double> > Kq;
	vector< vector<double> > Kdq;
	vector< vector<double> > M;
	double perturbation;	//For numerical differentiation
	int integratorType;
	double thetab;			// Ambient temperature
	
*/

public:
	Particle();
	Particle(double, vector<string>, int);
	~Particle(){}	

	/** Virtual functions from base */
	void setLocalGlob();
	void setDofs(void);
	void initializeGlobalDofs(vector<double> &, vector<double> &, const double &);
	void calcFi(const vector<double>&);
	void calcFq(const int&);
	void calcFt(const double&, const double&, const int&);
	void calcKi(double&);
	void calcKq(int);
	void calcKdq(double&);
	void calcM(const vector<double>&, const double &);
	void calcMLumped(const vector<double>&, const double &);
	void setMatAtComp(Material*);
	string getMatName()	{return 0;}
	void initializeCompRes(const bool&, const double&, const int&, const bool);
//	void initializeCompTang(const bool&, const bool&);
	void initializeCompTang(const bool&);
	void calcEner(double&, double&, double&, double&, double&, double&, double&, int&, vector<double>&, vector<double>&);
	void calcEntropy(double&, double&);
	void calcAM(vector<double>&, vector<double>&, vector<double>&);
	void updateComp(void);
	void setInitialConditions(vector<double>&, vector<double>&){}
	double getTemperature(void){};
	void setIniDofs(vector<double>&);
	void calcPhi(const vector<double>&);
	void calcDPhi(const vector<double>&);
	void calcMSmooth(const vector<double>&, const double&);
	void calcFSmooth(const vector<double>&, const vector<double>&, const double&);
	int checkState(void);
	
	/** Local functions */
//	void makeM();

};

#endif
